package routers

import (
	"car-master/handlers"
	"github.com/gin-gonic/gin"
)

func Routers() *gin.Engine {
	r := gin.Default()
	r.POST("login", handlers.Login)
	r.POST("addRn", handlers.RoleNode)
	r.GET("urList", handlers.UserRoleList)
	r.GET("rnList", handlers.RoleNodeList)

	r.POST("houseAdd", handlers.HouseAdd)
	r.POST("houseOrder", handlers.HoseOrderAdd)
	r.GET("houseList", handlers.HouseList)
	r.GET("houseDetail", handlers.HouseDetail)
	r.GET("userList", handlers.UserList)

	r.GET("car", handlers.CarList)
	r.GET("carDetail", handlers.CarDetail)
	return r
}
